package it.avantsoft.ls.gl.message;

import java.io.DataOutputStream;
import java.io.IOException;

public class NewUncleABMessage extends ABActivityMessage {

    protected int port;

    public NewUncleABMessage(DataOutputStream out, String id, int port) {
        super(out, id);
        this.port = port;
    }

    public boolean send() {

        boolean sent = false;

        try {
            writeByte(NEWUNCLE);
            writeUTF(id);
            writeInt(port);
            flush();
            sent = true;
        } catch (IOException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        }

        return sent;
    }
}
